package com.motus.pm.vo;

import org.apache.struts2.json.annotations.JSON;

/**
 * PmProjectPhaseId entity. @author MyEclipse Persistence Tools
 */

public class PmProjectPhaseId implements java.io.Serializable {

	// Fields

	private PmProjectInfo pmProjectInfo;
	private PmPhaseInfo pmPhaseInfo;

	// Constructors

	/** default constructor */
	public PmProjectPhaseId() {
	}

	/** full constructor */
	public PmProjectPhaseId(PmProjectInfo pmProjectInfo, PmPhaseInfo pmPhaseInfo) {
		this.pmProjectInfo = pmProjectInfo;
		this.pmPhaseInfo = pmPhaseInfo;
	}

	// Property accessors
	//@JSON(serialize=false)
	public PmProjectInfo getPmProjectInfo() {
		return this.pmProjectInfo;
	}

	public void setPmProjectInfo(PmProjectInfo pmProjectInfo) {
		this.pmProjectInfo = pmProjectInfo;
	}
	//@JSON(serialize=false)
	public PmPhaseInfo getPmPhaseInfo() {
		return this.pmPhaseInfo;
	}

	public void setPmPhaseInfo(PmPhaseInfo pmPhaseInfo) {
		this.pmPhaseInfo = pmPhaseInfo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof PmProjectPhaseId))
			return false;
		PmProjectPhaseId castOther = (PmProjectPhaseId) other;

		return ((this.getPmProjectInfo() == castOther.getPmProjectInfo()) || (this
				.getPmProjectInfo() != null
				&& castOther.getPmProjectInfo() != null && this
				.getPmProjectInfo().equals(castOther.getPmProjectInfo())))
				&& ((this.getPmPhaseInfo() == castOther.getPmPhaseInfo()) || (this
						.getPmPhaseInfo() != null
						&& castOther.getPmPhaseInfo() != null && this
						.getPmPhaseInfo().equals(castOther.getPmPhaseInfo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPmProjectInfo() == null ? 0 : this.getPmProjectInfo()
						.hashCode());
		result = 37
				* result
				+ (getPmPhaseInfo() == null ? 0 : this.getPmPhaseInfo()
						.hashCode());
		return result;
	}

}